package drawableClasses.components;

import java.awt.Component;

import javax.swing.JOptionPane;

import util.Util;

import baseClasses.Button;

public class ExitButton extends Button {
	private Util u = new Util();
	
	public ExitButton(int x, int y) {
		super(2, x, y);
		this.cenas[0] = u.getImg("Files/Images/Sprites/MenuComponents/BTN_SAIR.png");
		this.cenas[1] = u.getImg("Files/Images/Sprites/MenuComponents/BTN_SAIR_OVER.png");
		this.width = 256;
		this.heigth = 71;
	}

	@Override
	public void actionClicked(Component component) {
		if (JOptionPane.showConfirmDialog(null, "You really wish close the game?", "Closing Window Operation", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
			System.exit(0);
	}

}
